package cn.house.rent.mapper;

import cn.house.rent.entity.User;
import cn.house.rent.vo.HouseVo;
import cn.house.rent.vo.OrderVo;
import cn.house.rent.vo.TenantHomeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {

    //租客个人订单模块查询和搜索查询
    List<OrderVo> selectTenantOrder(@Param("user") User user,@Param("orderVo") OrderVo orderVo);

    //房东个人订单模块查询和搜索查询
    List<OrderVo> selectLandOrder(@Param("user") User user,@Param("orderVo") OrderVo orderVo);

    //根据id删除租客订单
    int deleteTenantOrderById(@Param("id") Integer id);

    //根据id删除房东订单
    int deleteLandOrderById(@Param("id") Integer id);

    //根据id修改房东订单表对应的订单状态
    int updateLandOrder(OrderVo orderVo);

    //根据id修改租客订单表对应的订单状态
    int updateTenOrder(OrderVo orderVo);

    // 用户添加租房订单
    int addTenantOrder(@Param("order") OrderVo orderVo);

    // 房东添加租房订单
    int addLandOrder(@Param("order") OrderVo orderVo);
}
